<div id="doc2" class="yui-t7">

  <div id="hd" role="banner"><h1><?php echo Yii::t('yii','Collector'); ?></h1></div>
  <div><?php $this->widget('textedit.components.TextEditor', array('id'=>'collector')); ?></div>
  <div id="bd" role="main">
    <form action="index.php" method="get" id="mainform">
      <div>
        <label for="search"><?php echo Yii::t('yii','Search'); ?>:</label>

        <input type="text" id="search" name="search" value="">
        <input type="submit" value="<?php echo Yii::t('yii','Go!'); ?>">
      </div>
    </form>
  <h2 id="resultsheader"><?php echo Yii::t('yii','Search results'); ?></h2>
    <div id="results">
        </div>

          <h2 id="preview"><?php echo Yii::t('yii','Web preview'); ?></h2>
      <iframe name="fr" id="fr"></iframe>
      </div>
  
</div>

   <script type="text/javascript" charset="utf-8">
goohoobi = function(){
  var results = document.getElementById('results');
  function seed(o){
    results.innerHTML = o.result;
    

                $('#content').setScrollableArea(30).jScrollPane({
                    scrollbarWidth: 13,
                    scrollbarMargin: 10,
                    animateTo: true
                });
  }
  function doSearch(){
    results.innerHTML = '<div class="yui-gb">\
      <div class="yui-u first" id="google">\
      <h2>Google loading &hellip;</h2></div>\
      <div class="yui-u" id="yahoo"><h2>Yahoo loading &hellip;</h2></div>\
      <div class="yui-u" id="bing"><h2>Bing loading &hellip;</h2></div>\
    </div>';
    var query = document.getElementById('search').value;
    var s = document.createElement('script');
          var research = '/research/true';
        s.setAttribute('src','collector/process/search/'+query+'/json/true/research/true');
    document.getElementsByTagName('head')[0].appendChild(s);
  }
  document.getElementById('mainform').onsubmit = function(){
    doSearch();
    return false;
  }
  return {se:seed}
}();
</script>

